<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/platform/include/include.jsp" %>
<html>
<head>
    <TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}"/></TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <%@ include file="/jsp/platform/include/header.jsp" %>
</HEAD>
<BODY>
<DIV class="all">
    <%@ include file="/jsp/platform/include/head.jsp" %>
    <%@ include file="/jsp/platform/include/menu.jsp" %>
    <DIV class="mains">
        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
            <TBODY>
            <TR valign="top">
                <%@ include file="/jsp/platform/include/mainLeft.jsp" %>
                <TD>
                    <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
                        <TBODY>
                        <TR>
                            <TD>
                                <TABLE width="180" border="0" cellspacing="0" cellpadding="0">
                                    <TBODY>
                                    <TR>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_l.jpg">
                                        </TD>
                                        <TD align="center"
                                            background="<%=request.getContextPath()%>/images/pages_bg.jpg">
                                            <SPAN class="f_tit1">账务流水汇总</SPAN></TD>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_r.jpg">
                                        </TD>
                                    </TR>
                                    </TBODY>
                                </TABLE>
                            </TD>
                        </TR>
                        </TBODY>
                        <TR>
                            <TD>
                                <div class="pages_con">
                                    <FORM name="queryForm" id="queryForm"
                                          action="<%=request.getContextPath()%>/manage/custAcctLog/custAcctLogSummary"
                                          method="post">
                                        <div class="pages_con_20">

                                            <div class="transaction_external">
                                                <DIV class="clearfix">
															<SPAN class="label dl_w"
                                                                  style="padding-left: 20px; text-align: right;">起止日期：</SPAN>

                                                    <DIV class="select2 date">
                                                        <INPUT name="beginDate" class="easyui-datebox"
                                                               id="beginDate" style="border: none" type="text"
                                                               data-options="formatter:myformatter,parser:myparser"
                                                               value="${model.beginDate}">
                                                    </DIV>
                                                    <SPAN class="label margin_l_5">-</SPAN>

                                                    <DIV class="select2 date">
                                                        <INPUT name="endDate" class="easyui-datebox"
                                                               id="endDate" style="border: none" type="text"
                                                               data-options="formatter:myformatter,parser:myparser"
                                                               readonly
                                                               value="${model.endDate}">
                                                    </DIV>
                                                </DIV>

                                                <DIV class="clearfix">
															<SPAN class="fund-item"><SPAN class="label dl_w"
                                                                                          style="padding-left: 20px; text-align: right;">商户账户：</SPAN>
																<INPUT name="sysAccount" id="sysAccount"
                                                                       class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
                                                                       type="text" maxlength="30"
                                                                       value="<c:out value='${model.sysAccount}'/>">
                                                                    <SPAN class="label dl_w"
                                                                          style="padding-left: 20px; text-align: right;">商户名称：</SPAN>
																<INPUT name="merchantName" id="merchantName"
                                                                       class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
                                                                       type="text" maxlength="30"
                                                                       value="<c:out value='${model.merchantName}'/>">
																	<SPAN class="fund-item"> <SPAN class="fund-item">
																			<A class="btn confirm margin_l_10"
                                                                               onClick="$('#queryForm').submit();"
                                                                               href="javascript:void(0);">查询</A> </SPAN> <SPAN
                                                                            class="fund-item"> <A
                                                                            class="btn confirm margin_l_10"
                                                                            onClick="downloadEncashList();"
                                                                            href="javascript:void(0);">下载</A> </SPAN> </SPAN>
															</SPAN>
                                                </DIV>
                                            </DIV>
                                            <br>

                                            <div class="talbes">
                                                <table style="text-align: center" width="100%" border="0"
                                                       cellpadding="8" cellspacing="0">
                                                    <tbody>
                                                    <tr class="talbe_pubs_tr">
                                                        <td>商户账户</td>
                                                        <td>商户名称</td>
                                                        <td>期初账户</td>
                                                        <td>扫码充值(+)</td>
                                                        <td>在线充值(+)</td>
                                                        <td>刷卡充值(+)</td>
                                                        <td>T0取现(-)</td>
                                                        <td>T1取现(-)</td>
                                                        <td>信用卡还款(-)</td>
                                                        <td>游戏消费(-)</td>
                                                        <td>分享收益转出(+)</td>
                                                        <td>理论期末账户</td>
                                                        <td>实际期末账户</td>
                                                    </tr>
                                                    <c:forEach var="custAcctSummary" items="${custMap}">
                                                        <tr>
                                                            <td><c:out value="${custAcctSummary.sysAccount}"/></td>
                                                            <td><c:out value="${custAcctSummary.merchantName}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.beginAcct}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.incomeAmt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.nocardAmt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.cardAmt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.t0Amt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.t1Amt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.creditAmt}"/></td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.consumeAmt}"/>
                                                            </td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.spAmt}"/>
                                                            </td>
                                                            <td><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.endAcct}"/>
                                                            </td>
                                                            <td>
                                                            <c:choose>
                                                            	<c:when test="${custAcctSummary.endAcct - custAcctSummary.endAcctNature>=0.01}">
                                                            		<span style="color:red"><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.endAcctNature}"/></span>
                                                            	</c:when>
                                                            	<c:otherwise>
                                                            		<span><fmt:formatNumber pattern="#,##0.00"
                                                                                  value="${custAcctSummary.endAcctNature}"/></span>
                                                            	</c:otherwise>
                                                            </c:choose>
                                                            
                                                            </td>
                                                        </tr>
                                                    </c:forEach>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </FORM>
                                </div>
                                <!--当中内容块结束--></TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            </TBODY>
        </TABLE>
    </DIV>
    <%@ include file="/jsp/platform/include/foot.jsp" %>
        <script type="text/javascript">
            function downloadEncashList() {
                $("#queryForm").attr("action", "<%=request.getContextPath()%>/manage/custAcctLog/downAcctLogSummary");
                $('#queryForm').submit();
                $("#queryForm").attr("action", "<%=request.getContextPath()%>/manage/custAcctLog/custAcctLogSummary");
            }
        </script>
</BODY>
</HTML>
